package com.zlx.taskcenter.consumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @PackageName: com.goayuan.learn.mq.consumer.base
 * @ClassName: BaseConsumer
 * @Author: gaoYuan
 * @Date: 2022/2/24 13:20
 * @Description: BaseConsumer
 */
public abstract class BaseConsumer {

    public static final Logger logger = LoggerFactory.getLogger(BaseConsumer.class);

    /**
     * 接收消息
     * @param message
     */
    public abstract void onMessage(String message) throws Exception;

    /**
     * 错误处理
     * @param msg
     * @param e
     */
    public abstract void onError(String msg, Exception e);
}
